package com.nondo.rdp.finance.repository.course;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.nondo.rdp.core.common.StatusConstant;
import com.nondo.rdp.finance.domain.course.SectionProcess;

public interface SectionProcessRepository extends JpaRepository<SectionProcess, Long>,
		JpaSpecificationExecutor<SectionProcess> {
	@Query("select a from SectionProcess a where a.section.id=:sid and a.user.id=:uid and delFlag = '" + StatusConstant.DEL_FLAG_NORMAL + "'")
	SectionProcess getOne(@Param("sid") long aid, @Param("uid") long uid);

	@SuppressWarnings("unchecked")
	SectionProcess save(SectionProcess sectionProcess);

}
